<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{$AdminTitle}</title>
<style>

body, form, div, h1 {position:relative;width:auto;height:auto; font-family:"Verdana", "Arial", "Helvetica", "sans-serif"; margin:0px; padding:0px; font-size:12px;border:0px;clear:none;}
body {width:100%;height:100%;overflow:hidden;background-color:#002779;}
#loginBlock{left:50%;top:50%;margin:-154px 0 0 -234px;width:468px;height:308px;}
.lbtop_1{background-image:url("/res/Admin/Blue/login_1.jpg");width:100%;height:23px;}
.lbtop_2{background-image:url("/res/Admin/Blue/login_2.jpg");width:100%;height:147px;}
.lbcenter{width:100%;height:122px;}
.lbcenter_1{background-image:url("/res/Admin/Blue/login_3.jpg");width:16px;height:122px;float:left;}
.lbcenter_2{background-color:#fff;width:436px;height:122px;float:left;}
.lbcenter_3{background-image:url("/res/Admin/Blue/login_4.jpg");width:16px;height:122px;float:right;}
.lbbottom{background-image:url("/res/Admin/Blue/login_5.jpg");width:100%;height:16px;}

.input{border:1px solid #666;}
#msg{text-align:center;height:20px;line-height:20px;color:#F00;}


</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script>
if (window.jQuery) {
	document.write('<script type="text/javascript" src="/res/js/global.js"><\/script>');
} else {
	document.write('<script type="text/javascript" src="/res/js/global-jquery.js"><\/script>');
}
</script>
<script src="/res/js/jform.js"></script>
<script type="text/javascript">
jQuery(function(){
	$('#form1').submit(function(){
		var data = {"do":"login", "username":$('#username').val(), "password":$('#password').val()};
		$.post('/admin.php?mo=login', data, function(response, textStatus){
			//alert(response);
			//alert(response.result+' '+response.msg);
			if (response.result) {
				$('#form1').hide();
				$('#msg').html(response.msg.replace(/\n/g, "<br />")).css({"height":"60px", "line-height":"30px", "margin-top":"31px"});
				setTimeout('loginAdmin()', 1000);
			} else {
				$('#msg').text(response.msg);
			}
		}, "json");
		return false;
	});
});
function loginAdmin()
{
	var url = $('#url').val();
	if (url) {
		window.location = url;
	} else {
		window.location = '/admin.php';
	}
}
</script>
</head>

<body>
<div id="loginBlock">
	<div class="lbtop_1"></div>
	<div class="lbtop_2"></div>
    <div class="lbcenter">
        <div class="lbcenter_1"></div>
        <div class="lbcenter_2">
        <div id="msg">&nbsp;</div>
        <form action="" method="post" enctype="multipart/form-data" name="form1" id="form1">
        <input type="hidden" name="url" id="url" value="{$_GET['url']}" />
<table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr height="35">
              <td width="150" align="right">{$UsernameText}</td>
              <td>&nbsp;&nbsp;&nbsp;
                <input type="text" name="username" id="username" class="input" />
              </td>
            </tr>
            <tr height="35">
              <td align="right">{$PasswordText}</td>
              <td>&nbsp;&nbsp;&nbsp;
                <input type="password" name="password" id="password" class="input" />
              </td>
            </tr>
            <tr>
              <td height="35" align="center" colspan="2">
              	<input type="image" src="/res/Admin/Blue/bt_login.gif" />
              </td>
            </tr>
          </table>
        </form>
      </div>
        <div class="lbcenter_3"></div>
    </div>
	<div class="lbbottom"></div>
</div>
</body>
</html>